package com.quartet.modules.customer.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quartet.modules.customer.entity.TCustomerInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 客户信息表(TCustomerInfo)表数据库访问层
 *
 * @author makejava
 * @since 2021-05-04 16:25:15
 */
@Mapper
public interface TCustomerInfoDao extends BaseMapper<TCustomerInfo> {

    /**
     * 给客户的关联终端个数加个数
     * @param customerCode
     * @param count
     */
    @Update("update t_customer_info set assigned_terminals_num=assigned_terminals_num+#{count} where customer_code=#{customerCode}")
    void updateCustomerAssignedTerminalsNum(@Param("customerCode") String customerCode,@Param("count") int count);
}
